home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 26.zip
/
BS1 part 26
/
C for beginners.adf
/
source
/
countdown.c
< prev
next >
Wrap
C/C++ Source or Header
|
1978-01-17
|
563b
|
33 lines
/* countdown.c 16.4.1 */
#include <stdio.h>
void main()
{
printf("Time comparison with and without register\n");
printf("RETURN for start\n");
getchar();
printf("%cStart without_register", 7);
without_register();
printf("%c\nStop!\nregister routine\n",7);
printf("RETURN for start\n");
getchar();
printf("%cStart with_register", 7);
with_register();
printf("%c\nStop!\n\n", 7);
}
with_register()
{
register long i =5000000;/*Count from 5,000,000 to 0 */
while(i--)
;
}
without_register()
{
long i = 5000000;
while(i--)
;
}